<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>查看投票详情</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.servletContext.contextPath}/css/style.css" />

</head>
<body>
<%@include file="top.jsp"%>
<div id="vote" class="wrap">
    <h2>查看投票</h2>
    <ul class="list">
        <li>
            <h4>${sub.vsTitle}</h4>
            <p class="info">共有  ${fn:length(sub.options)} 个选项，已有${fn:length(sub.items)}个网友参与了投票。</p>
            <ol>
                <c:forEach var="option" items="${sub.options}">
                    <li>${option.voOption}
                        <div class="rate">
                            <div class="ratebg"><div class="percent" style="width:${fn:length(option.items)/fn:length(sub.items)*100}%"></div></div>
                            <p> ${fn:length(option.items)}<span>(                        <fmt:formatNumber type="number" value="${fn:length(option.items)/fn:length(sub.items)*100}" pattern="#.00"/>
%)</span></p>
                        </div>
                    </li>
                </c:forEach>

            </ol>
            <div class="goback"><a href="Subject!list.action?entityId=<s:property value='subject.id'/>">返回投票列表</a></div>
        </li>
    </ul>
</div>
<div id="footer" class="wrap">
    北大青鸟 &copy; 版权所有
</div>
</body>
</html>
